{template 'header-company'}
<!--当前位置-->
<div class="location layout960">
	当前位置: <a href="{SITE_URL}">首页</a>&nbsp;>>&nbsp; <a href="{url('company/index')}">企业库</a>
</div>
<!--当前位置 end-->
<div class="main layout960 fn-clear">
	<div class="entry-create bd fn-left">
		<form id="pub-form" name="createForm" action="?" method="post">
			<table>
				<thead>
				<tr>
					<th colspan="2">创建企业库</th>
				</tr>
				</thead>
				<tbody>
				<tr>
					<th width="150">企业名称：</th>
					<td width="530">
						<input name="title" id="title" value="{$title}" type="text" class="graybd-ipt easyui-validatebox reg-inp" data-options="required:true,validType:'remote[\'/ajax.php?action=doctitle\',\'value\',\'企业名称不符合规则或者已经被创建\']'" maxlength="80"/>
						<span id="vtitle"></span>
					</td>
				</tr>
                <tr>
                    <th>企业分类：</th>
                    <td><input id="chooseCat" type="button" value="选择/修改"/>请为您要创建的企业选择一个合适的分类。</td>
                </tr>
                <tr>
                    <th>已选分类：</th>
                    <td>
                        <ul id="selectedCats" class="fn-clear" name="select"></ul>
                        <select name="cates[]" multiple="multiple" id="cates" size="2" style="display: none;"></select>
                    </td>
                </tr>
				<tr>
					<th>&nbsp;</th>
					<td><input name="createSubmit" type="submit" value="创建" class="sbt-entry"/></td>
				</tr>
				</tbody>
			</table>
		</form>
	</div>
	<div class="entry-norms bd fn-right">
		<h2>企业库编辑标准规范</h2>
		<ul>
			<li>企业名称必须六字以上</li>
			<li>不得含有特殊符号</li>
			<li>不得含有空格</li>
			<li>必须填写企业类别</li>
		</ul>
	</div>
</div>
<!--企业分类 对话框 start-->
<div style="display: none">
    <div id="companyCat" title="选择分类" class="easyui-dialog" style="padding:10px;" data-options="closed:'true'">
        <div class="company-cat">
            {Ext::categoryHtml(CompanyEntry::cateCateTree())}
        </div>
    </div>
</div>
<!--企业分类 对话框 start-->
<script type="text/javascript">
	seajs.use(['$','mod-catSelection','easyui', 'easyui-css'], function ($,CatSel) {
        var catSel = new CatSel('chooseCat','companyCat','selectedCats','cates');
        catSel.run();
		$('#pub-form').on('submit', function () {
			return $('#pub-form').form('validate');
		});
	})
</script>
<!--主体部分 end-->
{template 'footer'}